Table 5-3. JDBC Connection Properties
|
Property
|
Description
|
|
allowPrefetch
|
allowPrefetch={0 | 1}. Enables the prefetch feature. When enabled, the JDBC driver requests a next set of rows from the server while the client application is processing the previous set of rows.
When set to 1, the prefetch feature is enabled. Overall throughput increases, if the application always fetches all rows from a result set. When this feature is enabled and the application does not fetch all data from result sets, performance can be significantly degraded.
When set to 0 (the initial default), the prefetch feature is disabled.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
- server data source
|
|
AlternateServers
|
A comma-separated list of alternate SequeLink servers that the driver will try to connect to if the primary SequeLink server is unavailable. The value of this property is a string that specifies each alternate SequeLink server. This string has the format:
(servername1:port1[;serverDataSource=datasourcename], servername2:port2[;serverDataSource=datasourcename],...)
The server name and port number are required for each alternate server entry. The serverDataSource property (serverDataSource=datasourcename) is optional for each alternate SequeLink server entry.
For example, the connection string
jdbc:sequelink://server1:19996;serverDataSource=SDSN1;User=test;Password=secret;AlternateServers=(server2:19996;serverDataSource=SDSN2, server3:19996;serverDataSource=SDSN3)
contains alternate server entries for server2 and server3.
The ConnectionRetryCount property controls the number of times the driver retries the primary database server, and if specified, alternate servers while attempting to establish a connection. The ConnectionRetryDelay property sets the wait interval, in seconds, between retry attempts.
The LoadBalancing property controls the order in which the driver sequences through the list of servers (primary and alternate) while attempting to establish a connection.
|
|
ApplicationName
|
Identifies the application that is establishing the connections. When the application does not provide a value, the initial default is SequeLink for JDBC Application.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
blockFetchForUpdate
|
blockFetchForUpdate={0 | 1}. Specifies a workaround connection attribute. When the isolation level is Read Committed and a SELECT FOR UPDATE statement is issued against some data stores, the JDBC Client does not lock the expected row.
When set to 0, the appropriate row is locked.
When set to 1 (the initial default), the appropriate row is not locked.
IMPORTANT: Specifying 0 will degrade performance for SELECT FOR UPDATE statements because rows will be fetched one at a time.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
- server data source
|
|
certificateChecker
|
The fully qualified class name of a user-defined server certificate checker class. When the SequeLink Client and SequeLink Server have agreed on an SSL cipher suite that requires a server certificate, this class is used to verify the server certificate on behalf of the client. The class must be an implementation of the com.ddtek.sequelink.cert.CertificateCheckerInterface interface.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
For more information about certificate checker classes, refer to the SequeLink Administrator's Guide.
|
|
cipherSuites
|
The SSL cipher suites with which the JDBC Client can use to connect. This property is required when networkProtocol=ssl.
For a list of supported cipher suites, refer to the SequeLink Administrator's Guide.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
ConnectionRetryCount
|
The number of times the driver retries connection attempts to the primary SequeLink server, and if specified, alternate SequeLink servers until a successful connection is established. Valid values are 0 and any positive integer.
When set to 0 (the initial default), the driver does not try to reconnect after the initial unsuccessful attempt.
For example, in the case where the following properties are specified:
AlternateServers=(server2:19996,server3:19996, server4:19999);
and
ConnectionRetryCount=1
If a connection is not successfully established on the driver's first pass through the list of database servers, the driver retries all the servers in the list only once.
If an application sets a login timeout value (for example, using DataSource.loginTimeout or DriverManager.loginTimeout), the login timeout takes precedence over this property. For example, if the login timeout expires, any connection attempts stop.
The ConnectionRetryDelay property sets the wait interval, in seconds, between retry attempts.
If the LoadBalancing property is set to true, the driver sequence through the list of servers (primary and alternate) in a different order each time.
|
|
ConnectionRetryDelay
|
The number of seconds the driver will wait between connection retry attempts when ConnectionRetryCount is set to a positive integer.
The initial default is 3.
For example, in the case where the following properties are specified:
AlternateServers=(server2:19996,server3:19996,server4:19996)
and
ConnectionRetryCount=2
and
ConnectionRetryDelay=5
If a connection is not successfully established on the driver's first pass through the list of SequeLink servers, the driver retries the list of servers twice. It waits 5 seconds between the first connection retry attempt and the second connection retry attempt.
|
|
ConvertNull
|
ConvertNull={1 | 0}. Controls how data conversions are handled for null values.
If set to 1 (the default), the driver checks the data type being requested against the data type of the table column storing the data. If a conversion between the requested type and column type is not defined, the driver generates an "unsupported data conversion" exception regardless of the data type of the column value.
If set to 0, the driver does not perform the data type check if the value of the column is null. This allows null values to be returned even though a conversion between the requested type and the column type is undefined.
|
|
databaseName
|
The name of the data store to which you want to connect.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
- server data source
|
|
DBPassword
|
The data store password, which may be required depending on the server configuration.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
DBUser
|
The data store user name, which may be required depending on the server configuration.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
description
|
A description of the connection or data source.
This property can be specified using:
|
|
encrypted
|
encrypted={0 | 1}. Enables the use of direct SSL encryption. When SSL encryption is configured on the SequeLink Server, only this setting is required. When SSL encryption is not configured on the SequeLink Server, this property is ignored.
NOTE: Because SequeLink Server for DB2 for z/OS cannot support SSL, enabling this property in the connection string generates an error.
When set to 0 (the default), direct SSL encryption is not used.
When set to 1, direct SSL encryption is used.
Example:
jdbc:sequelink://mysecurehost:19996;encrypted=1
|
|
HPassword
|
The host password, which may be required depending on the server configuration.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
HUser
|
The host user name, which may be required depending on the server configuration.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
InitializationString
|
Specifies one or multiple SQL commands to be executed by the driver after it has established the connection to the database and has performed all initialization for the connection. The following connection URL sets the handling of null values to the SequeLink default:
jdbc:datadirect:sybase://server1:5000;
InitializationString=set ANSINULL off;
DatabaseName=test
Multiple commands must be separated by semicolons. In addition, if this property is specified in a connection URL, the entire value must be enclosed in parentheses when multiple commands are specified. The following connection URL sets the handling of null values to the Sybase default and allows delimited identifiers:
jdbc:datadirect:sybase://server1:5000;
InitializationString=(set ANSINULL off;
set QUOTED_IDENTIFIER on);DatabaseName=test
If the execution of a SQL command fails, the connection attempt also fails and the driver throws an exception indicating which SQL command or commands failed.
|
|
insensitiveResultSetBufferSize
|
insensitiveResultSetBufferSize={-1 | 0 | x}. Determines the amount of memory used by the driver to cache insensitive result set data. It must have one of the following values:
If set to -1, the driver caches all insensitive result set data in memory. If the size of the result set exceeds available memory, an OutOfMemoryException is generated. Because the need to write result set data to disk is eliminated, the driver processes the data more efficiently.
If set to 0, the driver caches all insensitive result set data in memory, up to a maximum of 2 GB. If the size of the result set data exceeds available memory, the driver pages the result set data to disk. Because result set data may be written to disk, the driver may have to reformat the data to write it correctly to disk.
If set to x, where x is a positive integer, the driver caches all insensitive result set data in memory, using this value to set the size (in KB) of the memory buffer for caching insensitive result set data. If the size of the result set data exceeds the buffer size, the driver pages the result set data to disk. Because the result set data may be written to disk, the driver may have to reformat the data to write it correctly to disk. Specifying a buffer size that is a power of 2 results in more efficient memory use.
The initial default is 2048 (KB).
|
|
JavaDoubleToString
|
JavaDoubleToString={true | false}. Determines whether the driver uses its internal conversion algorithm or the JVM conversion algorithm when converting double or float values to string values.
If set to true, the driver uses the JVM algorithm when converting double or float values to string values.
If set to false (the initial default), the driver uses its internal algorithm when converting double or float values to string values. Using this value improves performance; however, slight rounding differences can occur when compared to the same conversion using the JVM algorithm. These differences are within the allowable error of the double and float data types.
|
|
LoadBalancing
|
LoadBalancing={true | false}. Determines whether the driver will use client load balancing in its attempts to connect to the list of SequeLink servers (primary and alternate).
When set to true, client load balancing is used and the driver attempts to connect to the list of SequeLink servers (primary and alternate servers) in random order.
When set to false (the initial default), client load balancing is not used and the driver connects to each server based on their sequential order (primary server first, then, alternate servers in the order they are specified).
For example, in the case where the following properties are specified:
AlternateServers=(server2:19996,server3:19996,server4:19996)
and
LoadBalancing=true,
The driver randomly selects from the list of primary and alternate servers which server to connect to first. If that connection fails, the driver again randomly selects from this list of servers until all servers in the list have been tried or a connection is successfully established.
Refer to the SequeLink Administrator's Guide for a discussion of specifying connection information for primary and secondary SequeLink servers.
|
|
LongDataCacheSize
|
LongDataCacheSize={-1 | 0 | x}. Determines whether the driver caches long data in result sets (images, pictures, long text, or binary data).
If set to -1, the driver does not cache long data in result sets. It is cached on the server. Use this value only if your application returns columns in the order they are defined in the result set.
If set to 0, the driver caches long data in result sets in memory. If the size of the result set data exceeds available memory, the driver pages the result set data to disk.
If set to x, where x is a positive integer, the driver caches long data in result sets in memory and uses this value to set the size (in KB) of the memory buffer for caching result set data. If the size of the result set data exceeds available memory, the driver pages the result set data to disk.
|
|
MSSMapLongtoDecimal
|
Turns on client-side workarounds that allow you to take full advantage of the JDBC driver with JDBC applications that require non-standard or extended behavior. For more information, refer to the SequeLink Administrator's Guide.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
- server data source
|
|
networkProtocol
|
networkProtocol={socket | ssl}. Specifies the protocol to be used.
The initial default is socket.
When set to socket (the initial default), SSL encryption is not used.
When set to ssl, SSL encryption over the SequeLink Proxy Server is used. This has the same effect as specifying the following:
jdbc:sequelink:ssl://host= ...
NOTE: This property is not required when using the encrypted connection property to define direct SSL encryption without the use of the SequeLink Proxy Server.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
newPassword
|
The new host password to be used. If specified and applicable to the connection, the SequeLink password change mechanism is invoked. When the password has been changed successfully, the following warning is returned:
[DataDirect][SequeLink JDBC driver] [SequeLink Server] The user password was changed successfully
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
For more information about the SequeLink password change mechanism, refer to the SequeLink Administrator's Guide.
|
|
ORANumber0IsNumeric
|
Turns on client-side workarounds that allow you to take full advantage of the JDBC driver with JDBC applications that require non-standard or extended behavior. For more information, refer to the SequeLink Administrator's Guide.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
- server data source
|
|
password
|
The host or data store password, which may be required depending on the server configuration.
This property can be specified using:
- getConnection
- JDBC data source
- URL
- java.util.properties
|
|
portNumber
|
The TCP/IP port on which the SequeLink service is listening.
This property can be specified using:
|
|
QueryTimeout
|
QueryTimeout={0 | -1}. The value of this option will set the default query timeout (in seconds) for all statements created by the connection.
When set to 0 (the initial default), there is no timeout. If an application calls the Statement.setQueryTimeout method to set a timeout value for a statement, the value specified in the setQueryTimeout method will override the default value specified by this connection option.
When set to -1, the driver query timeout functionality is disabled. The driver silently ignores calls to Statement.setQueryTimeout.
|
|
resultSetMetaDataOptions
|
resultSetMetaDataOptions={0 | 1}. Returns table name information in the ResultSet metadata for Select statements if your application requires that information.
If set to 0 (the initial default) and the ResultSetMetaData.getTableName() method is called, the driver does not perform additional processing to determine the correct table name for each column in the result set. In this case, the getTableName() method may return an empty string for each column in the result set.
If set to 1 and the ResultSetMetaData.getTableName() method is called, the driver performs additional processing to determine the correct table name for each column in the result set. The driver also can return schema name and catalog name information when the ResultSetMetaData.getSchemaName() and ResultSetMetaData.getCatalogName() methods are called if the driver can determine that information.
By default, the JDBC driver skips the additional processing required to return the correct table name for each column in the result set when the ResultSetMetaData.getTableName() method is called. Because of this, the getTableName() method may return an empty string for each column in the result set. If you know that your application does not require table name information, this setting provides the best performance.
|
|
serverDataSource
|
A property that specifies a string to identify the server data source to be used for the connection. If unspecified, the configuration of the default server data source will be used for the connection.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
|
|
serverName
|
The TCP/IP address of the SequeLink server in dotted format or host name format.
This property can be specified using:
|
|
SLKStaticCursorLongColBuffLen
|
The amount of data (in KB) that is buffered for SQL_LONGVARCHAR and SQL_LONGVARBINARY columns with an insensitive result set.
The initial default is 4.
This property can be specified using:
- JDBC data source
- URL
- java.util.properties
- server data source
|
|
spyAttributes
|
Enables DataDirect Spy, a tool that can be used to log detailed information about calls issued by a running application to the SequeLink for JDBC driver. The format for the value of this property is:
(spy_attribute[;spy_attribute]...)
For example:
SpyAttributes=(log=(file)/tmp/spy.log;linelimit=80)
logs all JDBC activity to a file using a maximum of 80 characters for each line.
NOTE: If coding a path on Windows to the log file in a Java string, the backslash character (\) must be preceded by the Java escape character, a backslash. For example:
log=(file)C:\\temp\\spy.log
By default, DataDirect Spy is not enabled.
|
|
transliterationWorkaroundServer
|
transliterationWorkaroundServer={0 | 1 | 2}. Turns on a workaround for multiple transliteration workarounds. Refer to the SequeLink Administrator's Guide for more information about how SequeLink handles transliteration.
When set to 0 (the initial default), the workaround is not enabled.
When set to 1 or 2, this workaround resolves transliteration issues between Shift-JIS/Windows-31j and eucJP by mapping "look-alike" characters.
|
|
user
|
The host or data store user name, which may be required depending on the server configuration.
This property can be specified using:
- getConnection
- JDBC data source
- URL
- java.util.properties
|